import Vue from 'vue'
import VueRouter from 'vue-router'
import home from "../views/home.vue"
import type from "../views/type.vue"
import file from "../views/file.vue"
import friend from "../views/friend.vue"
import message from "../views/message.vue"
import tag from "../views/tag.vue"
import blog_article from "../views/show_blog_article.vue"

Vue.use(VueRouter)

const routes = [
	//重定向机制!!!!!
  {  path:"/", redirect:'home' },
  {
    path: '/home',
    name: '首页',
    component: home
  },
  {
	path: '/type',
	name: '分类页',
	component: type
  },
  {
	path: '/tag',
	name: '标签页',
	component: tag
  },
  {
  	path: '/file',
  	name: '归档页',
  	component: file
  },
  {
  	path: '/friend',
  	name: '友链',
  	component: friend
  },
  {
  	path: '/message',
  	name: '留言',
  	component: message
  },
  {
	path: '/blog_artile',
	name: '博客详情',
	component: blog_article
  }
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
